home *** CD-ROM | disk | FTP | other *** search
- <HTML id=dlgFind STYLE="font-family: ms sans serif; font-size: 8pt;
- width: 33.5em; height: 11.2em">
- <HEAD>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <TITLE id=dialogTitle>
- Find
- </TITLE>
- <SCRIPT LANGUAGE="JavaScript" defer>
- function callHelp(elm)
- {
- if (null != elm.helpid)
- {
- window.showHelp(elm.helpfile, "" + parseInt(elm.helpid),
- "popup");
- }
- else
- {
- if ("BODY" != elm.tagName)
- {
- callHelp(elm.parentElement);
- }
- }
- }
- function btnCancelClick()
- {
- window.close();
- }
- function getTextRange(elm)
- {
- var r = elm.parentTextEdit.createTextRange();
- r.moveToElementText(elm);
- return r;
- }
- function mouseClick()
- {
- if (window.event.srcElement.id.substring(0,3)
- == "txt")
- {
- return;
- }
- if (window.event.button == 2)
- {
- callHelp(window.event.srcElement);
- }
- }
- function txtDefaultESC()
- {
- if (event.keyCode == 27)
- {
- window.close();
- return;
- }
- }
- window.onerror = HandleError
- function HandleError(message, url, line)
- {
- var L_Dialog_ErrorMessage = "An error has occured in this dialog.";
- var L_ErrorNumber_Text = "Error: ";
- var str = L_Dialog_ErrorMessage + "\n\n"
- + L_ErrorNumber_Text + line + "\n"
- + message;
- alert (str);
- window.close();
- return true;
- }
- function setFindState(fKeyPress) { var htmlKeyAlt = 18; if (!fKeyPress || htmlKeyAlt != event.keyCode) { if (("" == txtFindText.value) == g_fFindEnabled) { btnFind.disabled = g_fFindEnabled; g_fFindEnabled = !g_fFindEnabled; } } else { window.setTimeout("set" + "Find" + "State(false)", 50); } }
- var g_fFindEnabled = false;
- var g_docLastFound;
- var g_fFrameset = false;
- var g_arrFrames = new Array();
- var g_fSearchTopFrame = false;
- var g_fFollowIframes = true;
- function findFlags()
- {
- var htmlMatchWord = 2;
- var htmlMatchCase = 4;
- return (htmlMatchWord * document.all.chkWholeWord.checked)
- | (htmlMatchCase * document.all.chkMatchCase.checked)
- }
- function CrawlPath()
- {
- var win = window.dialogArguments.unsecuredWindowOfDocument;
- var i = 0;
- if (g_fSearchTopFrame)
- {
- return win;
- }
- while (g_arrFrames[i] >= 0)
- {
- win = win.frames[g_arrFrames[i]];
- i++;
- }
- return win;
- }
- function AtFrameset()
- {
- var win = CrawlPath();
- return win.frames.length;
- }
- function AtIframe()
- {
- var win = CrawlPath();
- return win.document.all.tags("IFRAME").length;
- }
- function GetCurrentPos()
- {
- var i = GetCurrentDepth();
- return g_arrFrames[i];
- }
- function GetCurrentDepth()
- {
- var i = 0;
- while (g_arrFrames[i] >= 0)
- {
- i++;
- }
- return i-1;
- }
- function MovePossible(fForward)
- {
- var intCurPos = GetCurrentPos();
- var win = CrawlPath();
- var winParent = win.parent;
- if (fForward)
- {
- return winParent.frames.length - intCurPos - 1;
- }
- else
- {
- return (intCurPos != 0);
- }
- }
- function MoveUpFrameset()
- {
- var i = GetCurrentDepth();
- g_arrFrames[i] = -1;
- }
- function MoveDownFrameset(fForward)
- {
- var i = GetCurrentDepth();
- var win = CrawlPath();
- g_arrFrames[i+1] = fForward ? 0 : win.frames.length - 1;
- g_arrFrames[i+2] = -1;
- }
- function MoveWin(fForward)
- {
- var intDepth = GetCurrentDepth();
- var intPos = GetCurrentPos();
- g_arrFrames[intDepth] = fForward ? ++intPos : --intPos;
- }
- function MoveDoc(fForward)
- {
- if (g_fSearchTopFrame)
- {
- if (fForward)
- {
- g_fSearchTopFrame = false;
- return true;
- }
- else
- {
- return false;
- }
- }
- if (!fForward && (g_arrFrames[0] == 0) && (g_arrFrames[1] < 0)
- && window.dialogArguments.document.all.tags("IFRAME").length)
- {
- g_fSearchTopFrame = true;
- return true;
- }
- if (g_fFollowIframes && AtIframe())
- {
- MoveDownFrameset(fForward);
- while (!AtIframe() && AtFrameset())
- {
- MoveDownFrameset(fForward);
- }
- return true;
- }
- if (MovePossible(fForward))
- {
- MoveWin(fForward);
- g_fFollowIframes = true;
- while (!AtIframe() && AtFrameset())
- {
- MoveDownFrameset(fForward);
- }
- return true;
- }
- else
- {
- if (GetCurrentDepth() > 0)
- {
- MoveUpFrameset();
- while (AtIframe() && !MovePossible(fForward)
- && (GetCurrentDepth() >= 0))
- {
- MoveUpFrameset();
- }
- if (AtIframe() && MovePossible(fForward))
- {
- g_fFollowIframes = false;
- }
- return MoveDoc(fForward);
- }
- }
- return false;
- }
- function GetFirstDoc()
- {
- var win;
- var doc = window.dialogArguments.document;
- if (doc.all.tags("IFRAME").length)
- {
- g_fSearchTopFrame = true;
- return doc;
- }
- while (!AtIframe() && AtFrameset())
- {
- MoveDownFrameset(true);
- }
- win = CrawlPath();
- return win.document;
- }
- function btnFindClick()
- {
- var docSearch;
- var L_FinishedDocument_Text = "Finished searching the document.";
- var intDirection;
- var rngWorking;
- var rngFoundText;
- var fFoundText = false;
- var index;
- if (g_fFrameset)
- {
- var win;
- if (!AtIframe() && AtFrameset())
- {
- MoveDownFrameset(!radDirection[0].checked);
- while (!AtIframe() && AtFrameset())
- {
- MoveDownFrameset(!radDirection[0].checked);
- }
- }
- win = CrawlPath();
- docSearch = win.document;
- }
- else
- {
- docSearch = window.dialogArguments.document;
- }
- if (docSearch.queryCommandState("BrowseMode")
- && docSearch.selection.type != "Text")
- {
- if (docSearch.body == null)
- return;
- rngWorking = docSearch.body.createTextRange();
- }
- else
- {
- rngWorking = docSearch.selection.createRange();
- }
- fFoundText = (docSearch.selection.type == "Text");
- if (radDirection[0].checked)
- {
- if (fFoundText)
- {
- rngWorking.moveEnd("character" , -1);
- }
- while (0 != rngWorking.moveStart("textedit", -1))
- {
- }
- intDirection = -1000000;
- }
- else
- {
- if (fFoundText)
- {
- rngWorking.moveStart("character", 1);
- }
- while (0 != rngWorking.moveEnd("textedit", 1))
- {
- }
- intDirection = 1000000;
- }
- rngFoundText = rngWorking.duplicate();
- success = rngFoundText.findText(txtFindText.value,
- intDirection, findFlags());
- if (!success)
- {
- if (g_fFrameset)
- {
- if (MoveDoc(!radDirection[0].checked))
- {
- btnFindClick();
- return;
- }
- }
- alert(L_FinishedDocument_Text);
- txtFindText.focus();
- }
- else
- {
- if (g_fFrameset)
- {
- g_docLastFound.execCommand("Unselect", false);
- g_docLastFound = docSearch;
- }
- rngFoundText.select();
- rngFoundText.scrollIntoView(true);
- }
- }
- function btnCancelClick2()
- {
- window.dialogArguments.findText = txtFindText.value;
- window.close();
- }
- function loadBdy()
- {
- var win = window.dialogArguments.unsecuredWindowOfDocument;
- var doc = window.dialogArguments.document;
- btnFind.onclick = new
- Function("btnFindClick()");
- btnCancel.onclick = new Function("btnCancelClick2()");
- document.onhelp = new Function("callHelp(window.event.srcElement)");
- document.onmouseup = new Function("mouseClick()");
- txtFindText.onkeyup = new Function("setFindState(true)");
- txtFindText.onfocus = new Function("txtFindText.select()");
- txtFindText.onkeypress = new Function("txtDefaultESC()");
- if (win.frames.length)
- {
- var win2;
- g_fFrameset = true;
- g_arrFrames[0] = 0;
- g_arrFrames[1] = -1;
- win2 = CrawlPath();
- doc2 = win2.document;
- while (doc2.selection.type == "None")
- {
- if (MoveDoc(true))
- {
- win2 = CrawlPath();
- doc2 = win2.document;
- }
- else
- {
- g_arrFrames[0] = 0;
- g_arrFrames[1] = -1;
- break;
- }
- }
- doc = CrawlPath().document;
- g_docLastFound = doc;
- }
- if (doc.selection.type == "Control")
- {
- var r = doc.selection.createRange();
- r = getTextRange(r(0));
- r.select();
- }
- txtFindText.value = window.dialogArguments.findText;
- txtFindText.focus();
- txtFindText.select();
- setFindState(false);
- }
- </SCRIPT>
- </HEAD>
- <BODY ID=bdy onLoad="loadBdy()" style="font-family: 'ms sans serif';
- font-size: 8pt; background: threedface;" topmargin=0 scroll=no>
- <BUTTON id=btnFind ACCESSKEY=f DISABLED=1 tabIndex=55 helpid=50026
- helpfile="iexplore.hlp"
- style="font-family: ms sans serif; font-size: 8pt; position: absolute;
- left: 24.78em; top: 1.0647em; width: 7em; height: 2.2em; " type=submit>
- <U>F</U>ind Next
- </BUTTON>
- <DIV align=absMiddle
- style="font-family: ms sans serif; font-size: 8pt; position: absolute;
- left: 0.98em; top: 1.2168em; width: 4.8em; height: 1.2168em; ">
- <LABEL FOR=txtFindText ID=lblFindText tabIndex=-1 helpid=50027
- helpfile="iexplore.hlp">
- Fi<U>n</U>d what:
- </LABEL>
- </DIV>
- <INPUT type=text id=txtFindText ACCESSKEY=n tabIndex=15 helpid=50027
- helpfile="iexplore.hlp"
- style="font-family: ms sans serif; font-size: 8pt; position: absolute;
- left: 6.16em; top: 1.0647em; width: 17.36em; height: 2.1294em; ">
- <BUTTON id=btnCancel tabIndex=60 helpid="0x6F1C" helpfile="windows.hlp"
- style="font-family: ms sans serif; font-size: 8pt; position: absolute;
- left: 24.78em; top: 3.6504em; width: 7em; height: 2.2em; " type=reset>
- Cancel
- </BUTTON>
- <INPUT id=chkWholeWord ACCESSKEY=w type=checkbox tabIndex=25
- helpfile="iexplore.hlp" helpid=50022
- style="font-family: ms sans serif; font-size: 8pt; position: absolute;
- left: 0.68em; top: 3.8588em; width: 1em; height: 1em; ">
- <INPUT ACCESSKEY=c type=checkbox tabIndex=35 helpid=50023
- helpfile="iexplore.hlp"
- id=chkMatchCase style="font-family: ms sans serif; font-size: 8pt;
- position: absolute; left: 0.68em; top: 5.684em; width: 1em;
- height: 1em; ">
- <DIV
- style="font-family: ms sans serif; font-size: 8pt; position: absolute;
- left: 2.6em; top: 4.2588em; width: 12.46em; height: 1.521em; ">
- <LABEL FOR=chkWholeWord ID=lblWholeWord tabIndex=-1 helpid=50022
- helpfile="iexplore.hlp">
- Match <U>w</U>hole word only
- </LABEL>
- </DIV>
- <DIV style="font-family: ms sans serif; font-size: 8pt; position: absolute;
- left: 2.6em; top: 6.084em; width: 7.42em; height: 1.521em; ">
- <LABEL FOR=chkMatchCase ID=lblMatchCase tabIndex=-1 helpid=50023
- helpfile="iexplore.hlp">
- Match <U>c</U>ase
- </LABEL>
- </DIV>
- <FIELDSET id=fldDirection style="font-family: ms sans serif; font-size: 8pt;
- position: absolute; left: 13.7em; top: 3.5em; width: 9.7em;
- height: 4.2em;">
- <LEGEND>
- Direction
- </LEGEND>
- </FIELDSET>
- <INPUT id=radDirectionUp type=radio name=radDirection ACCESSKEY=u
- tabIndex=42 helpid=50025 helpfile="iexplore.hlp"
- style="font-family: ms sans serif; font-size: 8pt; position: absolute;
- left: 14.26em; top: 5.1235em; width: 1em; height: 1em; ">
- <DIV style="font-family: ms sans serif; font-size: 8pt;
- position: absolute; left: 16.2em; top: 5.3235em; width: 3.5em;
- height: 1.521em; ">
- <LABEL ID=lblDirectionUp style="font-family: 'ms sans serif'; font-size: 8pt"
- FOR=radDirectionUp
- tabIndex=45 helpid=50025
- helpfile="iexplore.hlp"> <U>U</U>p </LABEL>
- </DIV>
- <INPUT id=radDirectionDown type=radio CHECKED name=radDirection
- ACCESSKEY=d tabIndex=47 helpid=50024 helpfile="iexplore.hlp"
- style="font-family: ms sans serif; font-size: 8pt; position: absolute;
- left: 18.18em; top: 5.1235em; width: 1em; height: 1em; ">
- <DIV style="font-family: ms sans serif; font-size: 8pt;
- position: absolute; left: 20.1em; top: 5.3235em; width: 4.9em;
- height: 1.521em; ">
- <LABEL ID=lblDirectionDown style="font-family: 'ms sans serif'; font-size: 8pt"
- FOR=radDirectionDown helpid=50024 helpfile="iexplore.hlp"
- tabIndex=50> <U>D</U>own </LABEL>
- </DIV>
- </BODY>
- </HTML>
-